package org.eden.karb.event;

/**
 * Generic event dispatcher. An object that implements this interface is capable of publishing events.
 *
 * @param <T> event type
 * @author trsimoes
 */
public interface EventDispatcher<T extends Event, R extends EventParameters> {

    /**
     * Publishes an event.
     *
     * @param parameters parameters to be sent
     * @return event to be published
     */
    T publish(R parameters);
}
